package com.qinglei.recoup.system.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.qinglei.recoup.system.domain.EventProc;
import com.qinglei.recoup.system.pojo.EventProcItemDTO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author syp
 */
public interface EventProcMapper extends BaseMapper<EventProc> {

    List<EventProc> getCountByBedIds(@Param("bedIds") List<Integer> bedIds);

    IPage<EventProcItemDTO> pageAlarmEventList(IPage pageParam,
                                               @Param("bedId") Integer bedId,
                                               @Param("startTime") String startTime,
                                               @Param("endTime") String endTime,
                                               @Param("types") List<Integer> types);

    Integer getAlarmEventCount(@Param("bedId") Integer bedId,
                               @Param("startTime") String startTime,
                               @Param("endTime") String endTime,
                               @Param("types") List<Integer> types);

    List<Long> getHappeningEventIds4Hmp(@Param("bedId") Integer bedId,
                                           @Param("types") List<Integer> types);
}
